﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace RecruitmentPage.Models.RPModel
{
    public class Job
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public int UniqueId { get; set; }

        public string Name { get; set; }
        public string SalaryFrom { get; set; }
        public string SalaryTo { get; set; }

        [ForeignKey("CurrencyId")]
        public Currency Currency { get; set; }
        public Guid? CurrencyId { get; set; }
        /*
         * 0: Closed
         * 1: Open
         */

        public int Status { get; set; }
        public DateTime DatePost { get; set; }

        public string Description { get; set; }

        public string Requirement { get; set; }

        public ICollection<ApplyJob> ApplyJob { get; set; }


        [ForeignKey("PersonalId")]
        public PersonalInfor PersonalInfor { get; set; }
        public Guid PersonalId { get; set; }

        [ForeignKey("LocationId")]
        public Location Location { get; set; }
        public Guid LocationId { get; set; }

        [ForeignKey("IndustryId")]
        public Industry Industry { get; set; }
        public Guid IndustryId { get; set; }


    }
}